package com.qst.crop.service.impl;
import com.qst.crop.dao.UserDao;
import com.qst.crop.service.PhotoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.qst.crop.entity.User;

@Service
public class PhotoServiceImpl implements PhotoService {
    /**
     * @Description 实现用户登录验证
     * @Date 2022/5/18 15:27
     * @Param [UserVO]
     * @return com.bright.werk_ai.vo.UserVO
     **/
    @Autowired
    private UserDao userDao;
    /*@Override
    public UserVO login(UserVO UserVO) {
        UserVO token = null;
        QueryWrapper<User> wrapper = new QueryWrapper<>();
        wrapper.eq("username", UserVO.getUsername());

        User account = this.baseMapper.selectOne(wrapper);
        if (account != null) {
            if (UserVO.getPassword().equals(account.getPassword())) {
                token = UserVO;
                token.setId(account.getId());
            }
        } else {
            token=null;
        }
        return token;
    }*/

    @Override
    public User getById(int id) {
        User user = userDao.selectByidKey(id);
        return user;
    }


}

